<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>FrozenUI Demo</title>
    <link rel="stylesheet" href="../css/frozen.css">
    <link rel="stylesheet" href="../css/font-awesome.css"/>
    <style>
        .my-avatar{
            width: 35px;
            height: 35px;
            margin-top: 5px;
        }
        .my-reddot{
            position: relative;
        }
        .my-nav{
            width: 40%;
            height: 30px;
            background-color: #16b6f6;
            line-height: 30px;
            margin: auto;
            margin-top: 7px;
            border: 1px solid white;
        }
        .my-nav  .active{
            background-color: #ffffff;

        }
        .qq-blue-c{
            color: #18b4ed;
        }
        .qq-blue-b{
            background-color: #18b4ed;
        }
        .ui-tiled i{
            line-height:0.8;
        }
        .my-menu-box{
            color: #464646;
            font-size: 0.1rem;
        }
        .ui-tiled .active{
            color: #18b4ed;
        }
        .ui-tiled .active >i{
            color: #18b4ed;
        }
        .my-scroller{
            position: absolute;
            left: 0;
            right: 0;
            bottom: 56px;
            top: 45px;
            margin: auto;
        }
        .ui-badge-num{
            margin-top: 32px;
        }
        ul>li>div>h5{
            color: #858585;
        }
        a{
            text-decoration:none;
            color:#464646 ;
        }
        .my-loading{
            position: relative;
            width: 100%;
            z-index: 10000;
        }
        .my-loading-ul{
            height: 50px;

        }
        .ui-dialog-bd>div>h4{
            text-align: center;
        }

    </style>
</head>
<body>
<!--头部-->
<header class="ui-header ui-header-positive ui-border-b ">
    <div class="ui-row-flex">
        <div class="ui-col ">
            <div  class="my-reddot ">
                <div class="ui-avatar-s  my-avater">
                    <span style="background-image:url(http://b-ssl.duitang.com/uploads/item/201508/11/20150811233725_VKGr2.jpeg)"></span>
                </div>
            </div>
        </div>
        <div class="ui-col ui-col-4">

            <ul class="ui-tiled  my-nav">
                <li class="active" ><div>消息</div></li>
                <li><div>电话</div></li>
            </ul>

        </div>
        <div class="ui-col ">
            <i class="ui-icon-add qq-blue-c"></i>
        </div>
    </div>
</header>
<!--脚部-->
<footer class="ui-footer ui-footer-btn ui-btn-group ui-footer-stable">
    <footer class="ui-footer ui-footer-stable ui-border-t">
        <ul class="ui-tiled  my-menu-box">
            <li ><i class="fa fa-2-5x fa-comment-o" style="font-size: 2.5em;"></i><div class="my-menu"><a href="qqshou.html">消息</a></div></li>
            <li class="active"><i class="ui-icon-personal"></i><div class="my-menu">联系人</div></li>
            <li ><i class="fa fa-2-5x fa-star-o" style="font-size: 2.5em;"></i><div class="my-menu"><a href="qq.html">动态</a></div></li>
        </ul>
    </footer>
</footer>
<!--中间-->
<section class="ui-container">
    <div class="ui-selector-content my-scroller ui-scroller" style="display:block">
        <ul class="ui-list ui-border-b">
            <li style="margin-left: 0">
                <div class="ui-searchbar-wrap ui-border-b" style="width: 100%">
                    <div class="ui-searchbar ui-border-radius">
                        <i class="ui-icon-search"></i>
                        <div class="ui-searchbar-text">搜索号码（2-10位）</div>
                        <div class="ui-searchbar-input"><input value="" type="tel" placeholder="搜索号码（2-10位）" autocapitalize="off"></div>
                        <i class="ui-icon-close"></i>
                    </div>
                    <button class="ui-searchbar-cancel">取消</button>
                </div>
            </li>
            <li style="display: block;margin: 0;">
                <div class="ui-slider my-slider-1">
                    <ul class="ui-slider-content" style="width: 300%">
                        <li class="current"><span style="background-image:url(../img/3.png)"></span></li>
                        <li><span style="background-image:url(../img/3.png)"></span></li>
                        <li><span style="background-image:url(../img/3.png)"></span></li>
                    </ul>
                </div>
            </li>
            <li style="display: block;margin: 0;">
                <div class="ui-tab">
                    <ul class="ui-tab-nav ui-border-b">
                        <li class="current">热门推荐</li>
                        <li>全部表情</li>
                        <li>表情</li>
                    </ul>
                    <ul class="ui-tab-content" style="width:300%">
                        <li class="current"><p>这是第一个内容</p></li>
                        <li><p>这是第二个内容</p></li>
                        <li><p>这是第三个内容</p></li>
                    </ul>
                </div>
            </li>
            <!--//对话框-->
            <!--<li>-->
                <!--<div class="ui-dialog">-->
                    <!--<div class="ui-dialog-cnt">-->
                        <!--<header class="ui-dialog-hd ui-border-b">-->
                            <!--<h3>新手任务</h3>-->
                            <!--<i class="ui-dialog-close" data-role="button"></i>-->
                        <!--</header>-->
                        <!--<div class="ui-dialog-bd">-->
                            <!--<h4>标题标题</h4>-->
                            <!--<div>开通年费QQ会员即可领取欢乐斗地主感恩节回馈礼包！</div>-->
                        <!--</div>-->
                        <!--<div class="ui-dialog-ft">-->
                            <!--<button type="button" data-role="button">取消</button>-->
                            <!--<button type="button" data-role="button">开通</button>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</li>-->
            <li>
                <div class="ui-center">

                    <div class="ui-btn" id="btn1">模板创建弹窗</div>
                    <div class="ui-btn" id="btn2">DOM创建弹窗</div>
                </div>
                <div class="ui-dialog">
                    <div class="ui-dialog-cnt">
                        <div class="ui-dialog-bd">
                            <div>
                                <h4>标题</h4>
                                <div>内容</div></div>
                        </div>
                        <div class="ui-dialog-ft ui-btn-group">
                            <button type="button" data-role="button"  class="select" id="dialogButton<%=i%>">关闭</button>
                        </div>
                    </div>
                </div>
            </li>
            <li>
                <div class="ui-tooltips-vip">
                    <div class="ui-tooltips-cnt">
                        <i class="ui-icon-vip"></i>
                        <span>QQ会员xxxx</span>
                        <button class="ui-btn-vip">开通</button>
                    </div>
                </div>
            </li>
            <li>
                <div class="ui-grid-halve-img">
                    <span style="background-image:url(http://placeholder.qiniudn.com/290x160)"></span>
                    <div class="ui-progress">
                        <span style="width:80%"></span>
                    </div>
                </div>

            </li>
            <li>
                <div class="ui-grid-halve-img">
                    <span style="background-image:url(http://placeholder.qiniudn.com/290x160)"></span>
                </div>
            </li>
        </ul>

        <div class="ui-newstips-wrap">
            <div class="ui-newstips">
        <span class="ui-avatar-tiled">
            <span style="background-image:url(http://placeholder.qiniudn.com/60x60)"></span>
        </span>
                <div>新消息新消息新消息新消息新消息新消息新消息新消息</div>
                <span class="ui-reddot ui-reddot-static"></span>
            </div>
        </div>
        <div class="ui-tips ui-tips-warn">
            <i></i><span>警示已经发生或可能在未来发生的问题警示已经发生或可能在未来发生的问题</span>
        </div>
        <table class="ui-table ui-border">
            <thead>
            <tr><th>已购买</th><th>状态</th><th>会员到期时间</th></tr>
            </thead>
            <tbody>
            <tr><td>2014257777</td><td>使用中</td><td>2016-02-06</td></tr>
            <tr><td>2014257777</td><td>待付款</td><td><a href="#">付款</a></td></tr>
            <tr><td>2014257777</td><td>待付款</td><td><a href="#">付款</a></td></tr>
            </tbody>
        </table>
        <ul class="ui-list ui-list-text ui-border-tb">
            <li class="ui-border-t">
                <div class="ui-list-info">
                    <h4>标题标题标题标题标题标题标</h4>
                </div>
                <label class="ui-switch">
                    <input type="checkbox">
                </label>
            </li>


        </ul>
        <div class="ui-form ui-border-t">
            <form action="#">
                <div class="ui-form-item ui-form-item-show ui-form-item-link ui-border-b">
                    <label for="User">账号</label>
                    <input type="text"  id="User" value="421205351" readonly>
                </div>
                <div class="ui-form-item ui-form-item-show ui-border-b">
                    <label for="Card">身份证号码</label>
                    <input type="text" id="Card" value="445331199401055317">
                </div>
            </form>
        </div>
        <div class="ui-form ui-border-t">
            <form action="#">
                <a href="qq2.html">
                    <div class="ui-form-item ui-form-item-link ui-border-b">
                        消息
                    </div>
                </a>
                <div class="ui-form-item ui-form-item-link ui-border-b">
                    <a href="#">展示链接</a>
                </div>
                <div class="ui-form-item ui-form-item-link ui-border-b">
                    <a href="#">展示链接</a>
                </div>
            </form>
        </div>
        <div class="ui-form ui-border-t">
            <form action="#">
                <div class="ui-form-item ui-border-b">
                    <label>
                        身份证号码
                    </label>
                    <input type="text" placeholder="18位身份证号码">
                    <a href="#" class="ui-icon-close my-input" >
                    </a>
                </div>
                <div class="ui-form-item ui-form-item-textarea ui-border-b">
                    <label>
                        详细地址
                    </label>
                    <textarea placeholder="街道等详细地址"></textarea>
                </div>
                <div class="ui-form-item ui-form-item-l ui-border-b">
                    <label class="ui-border-r">
                        中国 +86
                    </label>
                    <input type="text" placeholder="请输入手机号码">
                    <a href="#" class="ui-icon-close my-input">
                    </a>
                </div>
            </form>
        </div>
    </div>

    <div class="ui-actionsheet">
        <div class="ui-actionsheet-cnt">
            <h4>同时会将我从对方的列表中删除</h4>
            <button>分享</button>
            <button class="ui-actionsheet-del">删除</button>
            <button>取消</button>
        </div>
    </div>

    <div class="ui-dialog">
        <div class="ui-dialog-cnt">
            <header class="ui-dialog-hd ui-border-b">
                <h3>新手任务</h3>
                <i class="ui-dialog-close" data-role="button"></i>
            </header>
            <div class="ui-dialog-bd">
                <h4>标题标题</h4>
                <div>开通年费QQ会员即可领取欢乐斗地主感恩节回馈礼包！</div>
            </div>
            <div class="ui-dialog-ft">
                <button type="button" data-role="button">取消</button>
                <button type="button" data-role="button">开通</button>
            </div>
        </div>
    </div>
</section>



<script src="../lib/zepto.min.js"></script>
<script src="../js/frozen.js"></script>
<script type="text/javascript">
    $(function(){
        //加载
        var scroll = new fz.Scroll('.ui-scroller', {
            scrollY: true,
            bounce:true
        });

        $(".ui-scroller")[0].ontouchend=function() {
            var s = scroll.getComputedPosition();
            scroll.refresh();
            console.log(s);
            if(s.y>2){
                $(".my-loading").show();
                $(".my-loading-ul").show();
                setTimeout(function(){
                    $(".my-loading-ul").hide();;
                    $(".my-loading").hide();
                },1000);
            }
        }

        console.log(scroll);
//    scrollTo(20)

        $('.my-nav > li').on("tap",function(){
            $('.my-nav > li').removeClass('active');
            $(this).addClass('active');
        });
        $('.my-menu-box > li').on("tap",function(){
            $('.my-menu-box > li').removeClass('active');
            $(this).addClass('active');
        });

//搜索框
        $('.ui-searchbar').tap(function(){
            $('.ui-searchbar-wrap').addClass('focus');
            $('.ui-searchbar-input input').focus();
        });
        $('.ui-searchbar-cancel').tap(function(){
            $('.ui-searchbar-wrap').removeClass('focus');
        });
//轮播
        var slider1 = new fz.Scroll('.my-slider-1', {
            role: 'slider',
            myslider : 'my-slider-1',
            indicator: true,
            autoplay: false,
            interval: 3000
        });

        slider1.on('beforeScrollStart', function(from, to) {
            // from 为当前页，to 为下一页
            console.log(from);

            console.log(to);
        })


        var tab = new fz.Scroll('.ui-tab', {
            role: 'tab',
            autoplay: true,
            interval: 3000
        });

        tab.on('beforeScrollStart', function(from, to) {
//            console.log(from, to);
        });

        tab.on('scrollEnd', function(curPage) {
//            console.log(curPage);
        });
//对话框
//        $(".ui-dialog").dialog("show");

        $("#btn1").tap(function(){
            var dia=$.dialog({
                title:'温馨提示',
                content:'温馨提示内容',
                button:["确认","取消"]
            });

            dia.on("dialog:action",function(e){
                console.log(e.index)
            });
            dia.on("dialog:hide",function(e){
                console.log("dialog hide")
            });

        })
        $("#btn2").tap(function(){
            var dia2=$(".ui-dialog").dialog("show");
            dia2.on("dialog:action",function(e){
                console.log(e.index)
            });
        })


    });
</script>
</body>
</html>